﻿module Uris


type HttpUrl = { 
    scheme:string
    host:string; 
    port:int option
    path:string; 
    queryString:string; 
    fragment:string 
    } with
    member public this.toUrl() = 
        let portStr = 
            match this.port with
            | Some(port) -> ":" + string(port)
            | None -> ""
        this.scheme + ":" + "//" + this.host + portStr + this.path + this.fragment
    member public this.authority = this.host, this.port

